package com.jack006.api.controller.admin;

import com.jack006.grace.result.GraceJSONResult;
import com.jack006.pojo.bo.SaveCategoryBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * @Classname CategoryMngControllerApi
 * @Description 文章分类控制类接口定义
 * @Date 2021-06-10 08:15
 * @Created by jack
 */
@Api(value = "文章分类维护",tags = "文章分类维护的 controller")
@RequestMapping("/categoryMng")
public interface CategoryMngControllerApi {


    @ApiOperation(value = "新增或修改分类",notes = "新增或修改分类",httpMethod = "POST")
    @PostMapping("/saveOrUpdateCategory")
    GraceJSONResult saveOrUpdateCategory(@Valid @RequestBody SaveCategoryBO newCategoryBO);

    @ApiOperation(value = "查询分类列表",notes = "查询分类列表",httpMethod = "POST")
    @PostMapping("/getCatList")
    GraceJSONResult getCatList();

    @ApiOperation(value = "用户端查询分类列表",notes = "用户端查询分类列表",httpMethod = "GET")
    @GetMapping("/getCats")
    GraceJSONResult getCats();

}
